package cn.whit.blog.service;

import java.sql.SQLException;
import java.util.List;

import cn.whit.blog.domain.Vote;
import cn.whit.blog.util.DynamicQuery;
import cn.whit.blog.util.PageModel;

public interface VoteService {
	Vote findById(String id) throws SQLException;
	
	List<Vote> findAll() throws SQLException;

	PageModel findByPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;
	
	List<Vote> findAllWithPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	int findTotalRecordsAndQuery(DynamicQuery query) throws Exception;

	void save(Vote vote) throws SQLException;

	void update(Vote vote) throws SQLException;

	PageModel findByPageAndQuery2(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	Vote getById(String id) throws SQLException;

	void deleteById(String s) throws SQLException;
}
